var page = document.getElementsByClassName("page")[0].getElementsByTagName("li");
for (var i = 1; i < page.length - 1; i++) {
	page[i].onclick = function(){
		for (var j = 1; j < page.length -1; j++) {
			if (page[j].hasAttribute("class")){
				page[j].attributes.removeNamedItem("class");
			}
		}
		this.setAttribute("class","current");
	}
}